package com.scorpio.appuser.controller;

import com.scorpio.appuser.domain.ApplePayCallbackLogEntity;
import com.scorpio.appuser.service.ApplePayCallbackLogServer;
import com.scorpio.common.core.controller.BaseController;
import com.scorpio.common.core.domain.Result;
import com.scorpio.security.annotation.PersonalLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/applePay")
public class ApplePayCallbackController extends BaseController {

    @Autowired
    private ApplePayCallbackLogServer logServer;

    @PersonalLogin
    @PostMapping("callbackList")
    public Result queryCallbackLog(@RequestBody ApplePayCallbackLogEntity logEntity) {
        return Result.success(logServer.list(logEntity));
    }
}
